package salary

type Employee struct {
	Name                  string
	Address               string
	EmployeeId            int
	PaymentClassification PaymentClassification
	PaymentMethod         PaymentMethod
	PaymentSchedule       PaymentSchedule
	Affiliation           Affiliation
}

func (e *Employee) PayDay(paycheck Paycheck) {
	grossPay := e.PaymentClassification.CalculatePay(paycheck)
	deductions := e.Affiliation.calculateDeductions(paycheck)
	netPay := grossPay - deductions
	paycheck.GrossPay = grossPay
	paycheck.Deductions = deductions
	paycheck.NetPay = netPay
	e.PaymentMethod.Pay(paycheck)
}
